package com.binfenhulian.chinaenergy.ces.crawler.bean.enums;

/**
 * 爬虫匹配类型枚举
 * Created by wanghjbuf on 2018/3/13.
 */
public enum CrawlerMatchTypeEnum {

    XPATH,
    REGEX;

    public static CrawlerMatchTypeEnum getCrawlerMatchTypeEnum(String value) {
        CrawlerMatchTypeEnum[] valueEnums = CrawlerMatchTypeEnum.values();
        for (int i = 0; i < valueEnums.length; i++) {
            if (value.equals(valueEnums[i].name())) {
                return valueEnums[i];
            }
        }
        return null;
    }
}
